/**
 * Created with IntelliJ IDEA.
 * Description: 存在连续三个奇数的数组
 * Author:  LiuTao
 * Version: 1.0
 * Date:    2023-08-04  20:30
 */
public class Test8 {
    public static void main(String[] args) {
        int[] array = {1,2,3,5,7};
        System.out.println(find(array));
    }

    public static boolean find(int[] array) {
        int count = 0;
        for (int i = 0; i < array.length; i++) {
            if(array[i] % 2 != 0) {
                count++;
                while (count == 3) {
                    return true;
                }
            }else {
                count = 0;
            }
        }
        return false;
    }
}
